<script lang="ts">
	import video from '$lib/directive/video';
	export let stream: MediaStream;
</script>

{#if stream}
	<div
		class="relative bg-white dark:bg-gray-800 dark:border-gray-600  shadow-md rounded-md border-2"
	>
		<video use:video={stream} class="w-1/2 h-auto rounded-md" autoPlay playsinline controls={false}>
			<track kind="captions" />
		</video>
	</div>
{/if}
